home *** CD-ROM | disk | FTP | other *** search
- #include <QuickTimeComponents.h>
- #include <types.h>
-
-
- typedef struct
- {
- ToneDescription tone;
- long size;
-
- long z1; /* must be zero */
- long quality; /* 5 */
- long stereoPan; /* 0 */
- long stereoSpread; /* 0 */
- long transpose; /* 1 */
- long flags; /* 0 */
- long pitchRandomness; /* 0 */
- long volumeAttackRate; /* 10 */
- long volumeDecayRate; /* 400 */
- long volumeSustainLevel; /* 38174 */
- long volumeNaturalDecayRate; /* 64640 */
- long volumeReleaseRate; /* 250 */
- long z[12]; /* must all be zero */
- long k1; /* must be 1 */
- long z2;
- long k127; /* must be 127 */
- long maxInterpolation; /* 3 is a good number, 0 is cheapest */
- long z3;
- long k124; /* must be 124 */
- long z4;
- /* This is the 'snd ' */
- long k0x00010001;
- long k0x00050000;
- long k0x00A00001;
- long k0x80510000;
- long k0x00000014;
- long z5;
- long sampleLength; /* number of bytes in sample data */
- Fixed sampleRate; /* fixed pt samples/second */
- long loopStart; /* first byte of loop, or zero for no loop */
- long loopEnd; /* last byte of loop, or zero for no loop */
- short midiKey; /* pitch produced by sampleRate */
-
- unsigned char sample[1]; /* sample data */
- } SingleFlatInstrument;
-
-
- #define kFlatInstrumentNoSndSize (sizeof(ToneDescription) + 128)
-
-
- FlatInstrument *CreateFlatInstrument(void);
- FlatInstrument *CreateFlatInstrumentFromSnd(short id);
-